﻿// Copyright © Microsoft Corporation.  All Rights Reserved.
// This code released under the terms of the 
// Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.)

using System.Windows.Interactivity;
using System.Windows;
using System.Windows.Controls;

namespace TheOliver.Controls
{
	public class DeepZoomNavigateHomeBehavior : TargetedTriggerAction<MultiScaleImage>
	{
        MultiScaleImage msi;

		protected override void Invoke(object parameter)
		{
			msi = this.Target as MultiScaleImage;
			
            msi.ViewportWidth = 1;
            msi.ViewportOrigin = new Point(0, 0);
		}
	}
}
